<script setup>

const {proxy} = getCurrentInstance();

const props = defineProps({
    downloadPath: {
      type: String,
    }
  })

  function downloadFile() {
    let exportPath = '/profile/download/'+props.downloadPath;
    proxy.downloadExcel(exportPath);
  }
</script>

<template>
  <div>
    导出文件成功，你可以选择 “下载Excel” 按钮下载文件

    <div class="download">
      <button class="btn" @click="downloadFile">下载Excel</button>
    </div>
  </div>
</template>

<style scoped lang="scss">
  .download {
    display: flex;
    justify-content: flex-end;
    button {
      font-size: 12px;
      color: #005bf5;
      background-color: transparent;
      border: 1px solid #005bf5;
      border-radius: 4px;
      padding: 6px 8px;
      margin-top: 20px;
      cursor: pointer;
    }
  }
</style>